<include file="public:header" />
<!--导入员工设置信息-->
<div class="pad_lr_10">

<table width="100%" cellspacing="0" class="search_form">
    <tbody>
        <tr>
            <td>
                <div class="explain_col">       
                             
                    <div id="J_upload_excel" class="btn" style="clear: both;"><span>{:L('upload_excel')}</span></div> 
                    
                    <div class="btn" style=" float:right;"><span><a href="__DEVICE_INFO_EXCEL_TEMP__">导出excel</a></span></div>
                    <div class="btn" style=" float:right;"><span><a href="__DEVICE_INFO_EXCEL_TEMP__">下载模板</a></span></div>   
                    
                    
                </div>
                 
            </td>
        </tr>
    
    </tbody>
</table>
                    
    
        <div style="width: 49%; float: left; ">
            <iframe src="{:U('padSim/index')}" width="100%" style="border: none; height: 500px;"></iframe>
        </div>
        <div style="width: 50%; float: right; ">
            <iframe src="{:U('padImei/index')}" width="100%" style="border: none; height: 500px;"></iframe>
        </div>        
</div>

<include file="public:footer" />
<script src="__STATIC__/js/fileuploader.js"></script>
<script>

	//上传excel
    var uploader = new qq.FileUploaderBasic({
    	allowedExtensions: ['xls'],
        button: document.getElementById('J_upload_excel'),
        multiple: false,
        action: "{:U('admin/uploadDeviceInfo')}",
        inputName: 'excel',
        forceMultipart: true, //用$_FILES
        messages: {
        	typeError: lang.upload_type_error,        	
        	minSizeError: lang.upload_minsize_error,
        	emptyError: lang.upload_empty_error,
        	noFilesError: lang.upload_nofile_error,
        	onLeave: lang.upload_onLeave
        },
        showMessage: function(message){
        	$.pinphp.tip({content:message, icon:'error'});
        },
        onSubmit: function(id, fileName){
        	$('#J_upload_excel').addClass('btn_disabled').find('span').text(lang.uploading);
        },
        onComplete: function(id, fileName, result){
            
        	$('#J_upload_excel').removeClass('btn_disabled').find('span').text(lang.upload_excel);
            if(result.status == '1'){
        		//$('#J_img').val(result.data);
                $.pinphp.tip({content:result.msg, icon:'success'});
        	} else {
        		$.pinphp.tip({content:result.msg, icon:'error'});
        	}
        }
    });
    
</script>
</body>
</html>